<?php
//use Illuminate\Support\Facades\Schema;
use Jialeo\LaravelSchemaExtend\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePicturesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('pictures', function (Blueprint $table) {
			$table->comment = '图片管理表';
            $table->increments('id')->comment('图片管理ID');
			$table->integer('image_id')->nullable()->comment('图片id');
			$table->tinyInteger('status')->default(1)->comment('状态:0=禁用,1=启用');
			$table->tinyInteger('type')->comment('类型:...');
			$table->integer('sort')->default(1)->comment('排序');
			$table->integer('product_id')->nullable()->comment('商品id');
			$table->integer('product_status')->nullable()->comment('是否为商品图片:0=无跳转,1=否,2=是');
			$table->text('product_content')->nullable()->comment('商品详情');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('pictures');
    }
}
